package pl.edu.pw.perg.compinfodb;

import org.apache.commons.logging.LogFactory;
import org.springframework.richclient.application.ApplicationLauncher;

public class CompInfoDB {

	public static void main(String[] args) {
        String rootContextDirectoryClassPath = "/pl/edu/pw/perg/compinfodb/ctx";

        String startupContextPath = rootContextDirectoryClassPath + "/startup-context.xml";

        String compinfodbApplicationContextPath = rootContextDirectoryClassPath
                + "/application-context.xml";

        String businessLayerContextPath = rootContextDirectoryClassPath + "/business-layer-context.xml";

        String securityContextPath = rootContextDirectoryClassPath + "/security-context.xml";

        try {
            new ApplicationLauncher(startupContextPath, new String[] { compinfodbApplicationContextPath,
                    businessLayerContextPath, securityContextPath });
        } catch (RuntimeException e) {
            LogFactory.getLog(CompInfoDB.class).error("RuntimeException during startup", e);
        }
    }
}
